package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysClassAndTeacherMapper;
import com.ruoyi.system.domain.SysClassAndTeacher;
import com.ruoyi.system.service.ISysClassAndTeacherService;
import com.ruoyi.common.core.text.Convert;

/**
 * 班级和教师关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-14
 */
@Service
public class SysClassAndTeacherServiceImpl implements ISysClassAndTeacherService 
{
    @Autowired
    private SysClassAndTeacherMapper sysClassAndTeacherMapper;

    /**
     * 查询班级和教师关联
     * 
     * @param ctId 班级和教师关联主键
     * @return 班级和教师关联
     */
    @Override
    public SysClassAndTeacher selectSysClassAndTeacherByCtId(String ctId)
    {
        return sysClassAndTeacherMapper.selectSysClassAndTeacherByCtId(ctId);
    }

    /**
     * 查询班级和教师关联列表
     * 
     * @param sysClassAndTeacher 班级和教师关联
     * @return 班级和教师关联
     */
    @Override
    public List<SysClassAndTeacher> selectSysClassAndTeacherList(SysClassAndTeacher sysClassAndTeacher)
    {
        return sysClassAndTeacherMapper.selectSysClassAndTeacherList(sysClassAndTeacher);
    }

    /**
     * 新增班级和教师关联
     * 
     * @param sysClassAndTeacher 班级和教师关联
     * @return 结果
     */
    @Override
    public int insertSysClassAndTeacher(SysClassAndTeacher sysClassAndTeacher)
    {
        return sysClassAndTeacherMapper.insertSysClassAndTeacher(sysClassAndTeacher);
    }

    /**
     * 修改班级和教师关联
     * 
     * @param sysClassAndTeacher 班级和教师关联
     * @return 结果
     */
    @Override
    public int updateSysClassAndTeacher(SysClassAndTeacher sysClassAndTeacher)
    {
        return sysClassAndTeacherMapper.updateSysClassAndTeacher(sysClassAndTeacher);
    }

    /**
     * 批量删除班级和教师关联
     * 
     * @param ctIds 需要删除的班级和教师关联主键
     * @return 结果
     */
    @Override
    public int deleteSysClassAndTeacherByCtIds(String ctIds)
    {
        return sysClassAndTeacherMapper.deleteSysClassAndTeacherByCtIds(Convert.toStrArray(ctIds));
    }

    /**
     * 删除班级和教师关联信息
     * 
     * @param ctId 班级和教师关联主键
     * @return 结果
     */
    @Override
    public int deleteSysClassAndTeacherByCtId(String ctId)
    {
        return sysClassAndTeacherMapper.deleteSysClassAndTeacherByCtId(ctId);
    }
}
